//! @author Adam Emil Skoog
//! @date   2012-01-05

#ifndef MEHDI_MEHDI_H_
	#define MEHDI_MEHDI_H_
	#include "Body.h"
	#include "Image.h"
	#include "kedja/Component.h"
	#include "kedja/KeyInputEventReceiver.h"

	namespace mehdi
	 {
		class Mehdi : public Body, public kedja::Component
		 {
			public:
				Mehdi();
				static Mehdi *const getCurrentMehdi();
				static void drawHUD();
				void draw() const;
				void update();
				const bool &pressedDown() const;

			protected:
				void onLand();

			private:
				static Image *image,
				             *imageTopBar,
							 *imageLetter;

				sf::View view;
				bool     mayJump,
				         hasPressedDown;

				kedja::KeyInputEventReceiver keyReceiver;

				static void onKeyPress(const sf::Key::Code &);
				static void onKeyRelease(const sf::Key::Code &);

				static Mehdi *currentMehdi;
		 };
	 }
#endif
